let o= [
    {
        name: '王尔德',
        object: 'javaScript',
        grade: 91,
    },{
        name: '司马相如',
        object: 'javaScript',
        grade: 100,
    },{
        name: '孔子',
        object: 'javaScript',
        grade: 61,
    },{
        name: '李白',
        object: 'javaScript',
        grade: 0,
    },
];
let tbody = document.querySelector('tbody');
for (let i = 0; i < o.length; i++) {
    let tr = document.createElement('tr');
    for (let k in o[i]) {
        let td = document.createElement('td');
        td.innerHTML = o[i][k];
        tr.appendChild(td);
    }
    let back = document.createElement('td');
    back.innerHTML = '<a href="javascript:;">删除</a>';
    tr.appendChild(back);
    tbody.appendChild(tr);

    let backs = document.querySelectorAll('a');
    for (let k = 0; k < backs.length; k++) {
        backs[i].onclick = function () {
            tbody.removeChild(tr);
        }
    }
}
